package com.zxx.pattern.factoryPattern.factoryDelete.abstrct;

import com.zxx.pattern.factoryPattern.factoryDelete.abstrct.factory.AbstractFactory;
import com.zxx.pattern.factoryPattern.factoryDelete.abstrct.factory.ColorFactory;
import com.zxx.pattern.factoryPattern.factoryDelete.abstrct.factory.ShapeFactory;

/**
 * @author zxx on 2020/12/29
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("SHAPE")){
            return new ShapeFactory();
        } else if(choice.equalsIgnoreCase("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
